package com.it;

import java.util.Scanner;

public class SwitchCaseDemo {
    public static void main(String[] args) {
        methodOne();

        System.out.println("请选择功能:1.存款 2.取款了.查询余额 4.退卡");
        int i = new Scanner(System.in).nextInt();
        switch (i){
            case 1:
                System.out.println("存款");
                break;
            case 2:
                System.out.println("取款");
                break;
            case 3:
                System.out.println("查询余额");
                break;
            case 4:
                System.out.println("退卡");
                break;
            default:
                System.out.println("输入错误");
        }


    }

    private static void methodOne() {
        int num = 1;
        switch (num) {
            case 1:
                System.out.println("111");
                break;
            case 2:
                System.out.println("222");
                break;
            default:
                System.out.println("333");
        }
    }
}
